<?php

include 'qrcode.class.php';

if ($_REQUEST ['profileurl']) {
	$qr = new SocialQrCode ();
	$qr->setCopyright ( "fansticker.net" );
	$qr->setSize ( $_REQUEST ['size'] );
	$qr->setType ( $_REQUEST ['type'] );
	$qr->generate ( $_REQUEST ['profileurl'] );
	if ($_REQUEST ['type'] == SocialQrCode::QRCODE_TYPE_PDF) {
		$qr->force_download ( 'qrcode.pdf' );
	} else {
		$qr->force_download ( 'qrcode.png' );
	}
}

?>